package com.lkd.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.lkd.domain.Sku;
import com.lkd.domain.VmType;
import com.lkd.mapper.VmTypeMapper;
import com.lkd.pageParam.VmTypePageParam;
import com.lkd.service.IVmTypeService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 售货机类型表 服务实现类
 * </p>
 *
 * @author author
 * @since 2025-02-12
 */
@Service
public class VmTypeServiceImpl extends ServiceImpl<VmTypeMapper, VmType> implements IVmTypeService {

    @Override
    public Page<VmType> getPage(VmTypePageParam param) {
        Page<VmType> page = new Page<>(param.getPageIndex(),param.getPageSize());
        LambdaQueryWrapper<VmType> wrapper = new LambdaQueryWrapper<>();
        wrapper.eq(VmType::getName,param.getName());
        page(page,wrapper);
        return page;
    }
}
